package cn.com.connext.scrm.domain.master;

import com.connext.common.domain.UUIDDomain;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Date;

/**
 * @Description:
 * @author: ZHaoYul
 * @date: 2021/9/10 15:58
 */
@Entity
@DynamicUpdate
@Table(name = "wx_busistocks_main_info")   // 定义数据库表名
public class MerchantRoll implements UUIDDomain, Serializable {
    @Id
    private String id;
    //商家券批次名称
    @Column(name = "stock_name" )
    private String stock_name;
    //批次归属商户号
    @Column(name = "belong_merchant" )
    private String belong_merchant;
    //批次备注
    @Column(name = "comment" )
    private String comment;
    //适用商品范围
    @Column(name = "goods_name" )
    private String goods_name;

    //批次类型	NORMAL：固定面额满减券批次 DISCOUNT：折扣券批次 EXCHANGE：换购券批次
    @Column(name = "stock_type" )
    private String stock_type;

    //券code模式
    @Column(name = "coupon_code_mode" )
    private String coupon_code_mode;

    //开始时间
    @Column(name = "available_begin_time" )
    private ZonedDateTime available_begin_time;

    //结束时间
    @Column(name = "available_end_time" )
    private ZonedDateTime available_end_time;
    //生效后N天内有效
    @Column(name = "available_day_after_receive" )
    private String available_day_after_receive;

    //商户请求单号
    @Column(name = "out_request_no" )
    private String out_request_no;

    //券可使用开始时间
//    @Column(name = "available_start_time" )
//    private ZonedDateTime available_start_time;

    //券过期时间
//    @Column(name = "expire_time" )
//    private ZonedDateTime expire_time;
    //卷 领卷事件
    @Column(name = "receive_time" )
    private ZonedDateTime receive_time;
//
//    //发券请求单号
//    @Column(name = "send_request_no" )
//    private String send_request_no;


    //核销请求单号
    @Column(name = "use_request_no" )
    private String use_request_no;


    //券核销时间
    @Column(name = "use_time" )
    private ZonedDateTime use_time;

    //是否允许营销补贴
    @Column(name = "subsidy" )
    private String subsidy;


    //批次号
    @Column(name = "stock_id" )
    private String stock_id;


    //批次状态
    @Column(name = "stock_state" )
    private String stock_state;


    //是否允许转赠 不填默认否，枚举值：
    //true：是
    //false：否
    @Column(name = "transferable" )
    private String transferable;


    //是否允许分享领券链接 不填默认否，枚举值：
    //true：是
    //false：否
    @Column(name = "shareable" )
    private String shareable;


    //券状态	SENDED：可用
    //USED：已核销
    //EXPIRED：已过期
    //DEACTIVATED：已失效
    @Column(name = "coupon_state" )
    private String coupon_state;

    //openid
    @Column(name = "openid" )
    private String openid;

    //openid
    @Column(name = "unionId" )
    private String unionId;

    @Column(name = "create_time" )
    private Date createTime;
    @Column(name = "wx_create_time" )
    private Date wx_create_time;
    @Column(name = "update_time" )
    private Date update_time;
    //券的唯一标识。
    @Column(name = "coupon_code" )
    private String coupon_code;
    //是否启用。 1是 0否
    @Column(name = "volume_start" )
    private String volumeStart;
    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getVolumeStart() {
        return volumeStart;
    }

    public void setVolumeStart(String volumeStart) {
        this.volumeStart = volumeStart;
    }

    public Date getWx_create_time() {
        return wx_create_time;
    }

    public void setWx_create_time(Date wx_create_time) {
        this.wx_create_time = wx_create_time;
    }

    public String getStock_name() {
        return stock_name;
    }

    public void setStock_name(String stock_name) {
        this.stock_name = stock_name;
    }

    public String getBelong_merchant() {
        return belong_merchant;
    }

    public void setBelong_merchant(String belong_merchant) {
        this.belong_merchant = belong_merchant;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public String getStock_type() {
        return stock_type;
    }

    public void setStock_type(String stock_type) {
        this.stock_type = stock_type;
    }

    public String getCoupon_code_mode() {
        return coupon_code_mode;
    }

    public void setCoupon_code_mode(String coupon_code_mode) {
        this.coupon_code_mode = coupon_code_mode;
    }

    public ZonedDateTime getAvailable_begin_time() {
        return available_begin_time;
    }

    public void setAvailable_begin_time(ZonedDateTime available_begin_time) {
        this.available_begin_time = available_begin_time;
    }

    public ZonedDateTime getAvailable_end_time() {
        return available_end_time;
    }

    public void setAvailable_end_time(ZonedDateTime available_end_time) {
        this.available_end_time = available_end_time;
    }

    public String getAvailable_day_after_receive() {
        return available_day_after_receive;
    }

    public void setAvailable_day_after_receive(String available_day_after_receive) {
        this.available_day_after_receive = available_day_after_receive;
    }

    public String getOut_request_no() {
        return out_request_no;
    }

    public void setOut_request_no(String out_request_no) {
        this.out_request_no = out_request_no;
    }

    public ZonedDateTime getReceive_time() {
        return receive_time;
    }

    public void setReceive_time(ZonedDateTime receive_time) {
        this.receive_time = receive_time;
    }

    public String getUse_request_no() {
        return use_request_no;
    }

    public void setUse_request_no(String use_request_no) {
        this.use_request_no = use_request_no;
    }

    public ZonedDateTime getUse_time() {
        return use_time;
    }

    public void setUse_time(ZonedDateTime use_time) {
        this.use_time = use_time;
    }

    public String getSubsidy() {
        return subsidy;
    }

    public void setSubsidy(String subsidy) {
        this.subsidy = subsidy;
    }

    public String getStock_id() {
        return stock_id;
    }

    public void setStock_id(String stock_id) {
        this.stock_id = stock_id;
    }

    public String getStock_state() {
        return stock_state;
    }

    public void setStock_state(String stock_state) {
        this.stock_state = stock_state;
    }

    public String getTransferable() {
        return transferable;
    }

    public void setTransferable(String transferable) {
        this.transferable = transferable;
    }

    public String getShareable() {
        return shareable;
    }

    public void setShareable(String shareable) {
        this.shareable = shareable;
    }

    public String getCoupon_state() {
        return coupon_state;
    }

    public void setCoupon_state(String coupon_state) {
        this.coupon_state = coupon_state;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getUnionId() {
        return unionId;
    }

    public void setUnionId(String unionId) {
        this.unionId = unionId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    public String getCoupon_code() {
        return coupon_code;
    }

    public void setCoupon_code(String coupon_code) {
        this.coupon_code = coupon_code;
    }
}
